project (ComboReduct)

SET(${PROJECT_NAME}_MAJOR_VERSION 0)
SET(${PROJECT_NAME}_MINOR_VERSION 1)
SET(${PROJECT_NAME}_PATCH_LEVEL 0)

#options
OPTION(COMPILE_TESTS "Compile tests" ON)

#check for external dependencies

#check for LADSUtil
FIND_LIBRARY(LADSUtil "LADSUtil")

IF(NOT LADSUtil)
       message(FATAL_ERROR "LADSUtil not found")
ELSE(NOT LADSUtil)
       message(STATUS "LADSUtil found at ${LADSUtil}")
ENDIF(NOT LADSUtil)

#check for Boost
FIND_PACKAGE(Boost REQUIRED)

if (NOT Boost_FOUND)
      message(FATAL_ERROR "Fatal error: Boost (version >= x.x.x) required.\n"
      )
endif (NOT Boost_FOUND)


IF(CMAKE_COMPILER_IS_GNUCXX)
#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector -Wall -g -pg")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector -Wall")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)

#install path
SET(CMAKE_INSTALL_PREFIX /usr/local)

#Select debug or release compiling option
SET(CMAKE_BUILD_TYPE Debug)
#SET(CMAKE_BUILD_TYPE Release)

add_subdirectory(src)
IF(COMPILE_TESTS)
	add_subdirectory (test)
ENDIF(COMPILE_TESTS)
